package cn.itrip.utlis;

import java.io.IOException;
import java.util.Properties;

/**
 * @Description :
 * Created by Li on 2020-12-30 16:19:43
 */
public class ConfigManager {
    private static final ConfigManager instance = new ConfigManager();
    private Properties props;
    private ConfigManager() {
        props = new Properties();
        try {
            props.load(getClass().getResourceAsStream("/db.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static ConfigManager getInstance() {
        return instance;
    }

    public String getValue(String key) {
        return props.getProperty(key);
    }
}
